
package com.ebupt.migu.music.bannertwo.enums;
import lombok.Getter;


/**
 * 条件类型枚举
 */
@Getter
public enum IdentifierEnum {
	FROPERTY_ENUM_1(1, "等于"),
	FROPERTY_ENUM_2(2, "小于"),
	FROPERTY_ENUM_3(3, "大于"),
	FROPERTY_ENUM_4(4, "小于等于"),
	FROPERTY_ENUM_5(5, "大于等于"),
	FROPERTY_ENUM_6(6, "不等于"),
	FROPERTY_ENUM_7(7, "列表等于（文件）"),
	FROPERTY_ENUM_8(8, "列表不等于（文件）"),
	FROPERTY_ENUM_9(9, "列表等于"),
	FROPERTY_ENUM_10(10, "列表不等于"),
	FROPERTY_ENUM_11(11, "百分比"),
	FROPERTY_ENUM_12(12, "为空"),
	FROPERTY_ENUM_13(13, "不为空"),
	FROPERTY_ENUM_14(14, "以..开始"),
	FROPERTY_ENUM_15(15, "不以..开始"),
	FROPERTY_ENUM_16(16, "以..结束"),
	FROPERTY_ENUM_17(17, "不以..结束"),
	FROPERTY_ENUM_18(18, "列表包含"),
	FROPERTY_ENUM_19(19, "列表不包含"),
	FROPERTY_ENUM_20(20, "在star︱end之间"),
	FROPERTY_ENUM_21(21, "是灰度用户"),
	PROPERTY_ENUM_22(22, "列表等于（人群）"),
	PROPERTY_ENUM_23(23, "列表不等于（人群）"),
	PROPERTY_ENUM_24(24, "列表等于（FTP上传人群）"),
	PROPERTY_ENUM_25(25, "列表不等于（FTP上传人群）"),
	PROPERTY_ENUM_26(26, "仅等于")
	;


	final int code;
	final String name;

	IdentifierEnum(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public static String getNameByCode(int code) {
		for (IdentifierEnum v : values()) {
			if (v.getCode() == code) {
				return v.getName();
			}
		}
		return null;
	}

	public static Integer getCodeByName(String name) {
		for (IdentifierEnum v : values()) {
			if (v.getName().equals(name)) {
				return v.getCode();
			}
		}
		return null;
	}
}
